1. /* sxcbexp1.cpp by K.Tsuru */
  2. // function ID 5102 BRADIX
  3. /***********************************
  4. SDecimal class
  5. base of natural logalithm in BRADIX
  6. exp(1)
  7. *************************************/
  8. #ifndef SN_H
  9. #include "sn.h"
  10. #endif
  11. SDecimal BE(){
  12. SDecimal delta(0.5), bexp1(2.5);
  13. ulong mt = delta.SlOpMaxValue(), k = 3uL;
  14. do{
  15. XsDiv(delta, k, delta);
  16. XXAdd(bexp1, delta, bexp1);
  17. if( (k++) >= mt ){
  18. delta.SetError(delta.NOT_CONVERGE,"BE()", -5102); break;
  19. }
  20. }while(delta.Sign());
  21. delta.upToTerm = k;
  22. return bexp1;
  23. }

sxcbexp1.cpp : last modifiled at 2016/09/04 14:21:44(559 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:58 (Fri Oct 27 15:45:58 2017).